<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>


<form id="pagerForm" method="post" action="../Employee.do">
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="17" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="../Employee.do" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					员工姓名：<input type="text" name="empName" />
				</td>
				<td>
					<select class="required" name="depId">
						<option value="">请选择部门</option>
						<c:forEach items="${depList}" var="dep">
							<option value="${dep.depId}">${dep.depName}</option>
						</c:forEach>
					</select>
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><s:a cssClass="add" namespace="/employee" action="add" target="navTab"><span>新增</span></s:a></li>
			<li><s:a cssClass="delete" action="delete?emp.empId={employee_id}" namespace="/employee" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></s:a></li>
			<li><s:a cssClass="edit" action="update?emp.empId={employee_id}" namespace="/employee" target="navTab"><span>修改</span></s:a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="120">员工编号</th>
				<th>姓名</th>
				<th width="150">性别</th>
				<th width="150">年龄</th>
				<th width="150">职位</th>
				<th width="150">部门</th>
				<th width="120" align="center">图片</th>
				<th width="80">下载</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="empList" var="emp">
			<tr target="employee_id" rel='<s:property value="#emp.empId"/>'>
				<td><s:property value="#emp.empId"/></td>
				<td><s:property value="#emp.empName"/></td>
				<td>
					<s:if test="#emp.empSex==0">男</s:if>
					<s:if test="#emp.empSex==1">女</s:if>
				</td>
				<td><s:property value="#emp.empAge"/></td>
				<td><s:property value="#emp.pos.posName"/></td>
				<td><s:property value="#emp.dep.depName"/></td>
				<td>
					
					<a target="dialog" mask=true resizable=true drawable=true rel="dlg_page1" title="显示大图" width="800" height="600" href="../showImg/showImg.jsp?photoPath=<s:property value ="#emp.photoPath"/>">
						<img src='../download/download.action?fileName=<s:property value = "#emp.photoPath"/>' height="20px"></img>
					</a>
				</td>
				<td>
					<s:a href="../download/download.action?fileName=%{#emp.photoPath}&photoName=%{#emp.photoName}" namespace="/download"><s:property value="#emp.photoName"/></s:a>
				</td>
			</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示17条，共${totalCount}条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="17" pageNumShown="10" currentPage="${pageNum}"></div>

	</div>
</div>

